From 1901d4ebd7572fc9e5243345e0436d18e4e52dd1 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Mon, 7 Jan 2002 07:59:08 +0000 Subject: [PATCH] don't forget to offset the pointer by x/y_offset into the new window when Mon Jan 7 08:48:23 2002 Tim Janik * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset the pointer by x/y_offset into the new window when we found the drag destination. * gtk/gtkaccelmap.c (internal_change_entry): fix return code for simulation when the entry already contains the required accel key and mod. --- ChangeLog | 10 ++++++++++ ChangeLog.pre-2-0 | 10 ++++++++++ ChangeLog.pre-2-10 | 10 ++++++++++ ChangeLog.pre-2-2 | 10 ++++++++++ ChangeLog.pre-2-4 | 10 ++++++++++ ChangeLog.pre-2-6 | 10 ++++++++++ ChangeLog.pre-2-8 | 10 ++++++++++ docs/reference/gtk/tmpl/gtk-unused.sgml | 13 +++++++++++++ docs/reference/gtk/tmpl/gtkaccelgroup.sgml | 9 +-------- docs/reference/gtk/tmpl/gtkpaned.sgml | 7 ------- docs/reference/gtk/tmpl/gtktypeutils.sgml | 1 + gtk/gtkaccelmap.c | 20 ++++++++++++++------ gtk/gtkdnd.c | 6 +++--- 13 files changed, 102 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 63c0f59e04..1af13f439d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Mon Jan 7 08:48:23 2002 Tim Janik + + * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset + the pointer by x/y_offset into the new window when we found + the drag destination. + + * gtk/gtkaccelmap.c (internal_change_entry): fix return code + for simulation when the entry already contains the required + accel key and mod. + 2002-01-06 Matthias Clasen * docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 63c0f59e04..1af13f439d 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,13 @@ +Mon Jan 7 08:48:23 2002 Tim Janik + + * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset + the pointer by x/y_offset into the new window when we found + the drag destination. + + * gtk/gtkaccelmap.c (internal_change_entry): fix return code + for simulation when the entry already contains the required + accel key and mod. + 2002-01-06 Matthias Clasen * docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 63c0f59e04..1af13f439d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +Mon Jan 7 08:48:23 2002 Tim Janik + + * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset + the pointer by x/y_offset into the new window when we found + the drag destination. + + * gtk/gtkaccelmap.c (internal_change_entry): fix return code + for simulation when the entry already contains the required + accel key and mod. + 2002-01-06 Matthias Clasen * docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 63c0f59e04..1af13f439d 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,13 @@ +Mon Jan 7 08:48:23 2002 Tim Janik + + * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset + the pointer by x/y_offset into the new window when we found + the drag destination. + + * gtk/gtkaccelmap.c (internal_change_entry): fix return code + for simulation when the entry already contains the required + accel key and mod. + 2002-01-06 Matthias Clasen * docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 63c0f59e04..1af13f439d 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,13 @@ +Mon Jan 7 08:48:23 2002 Tim Janik + + * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset + the pointer by x/y_offset into the new window when we found + the drag destination. + + * gtk/gtkaccelmap.c (internal_change_entry): fix return code + for simulation when the entry already contains the required + accel key and mod. + 2002-01-06 Matthias Clasen * docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 63c0f59e04..1af13f439d 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +Mon Jan 7 08:48:23 2002 Tim Janik + + * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset + the pointer by x/y_offset into the new window when we found + the drag destination. + + * gtk/gtkaccelmap.c (internal_change_entry): fix return code + for simulation when the entry already contains the required + accel key and mod. + 2002-01-06 Matthias Clasen * docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 63c0f59e04..1af13f439d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +Mon Jan 7 08:48:23 2002 Tim Janik + + * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset + the pointer by x/y_offset into the new window when we found + the drag destination. + + * gtk/gtkaccelmap.c (internal_change_entry): fix return code + for simulation when the entry already contains the required + accel key and mod. + 2002-01-06 Matthias Clasen * docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by diff --git a/docs/reference/gtk/tmpl/gtk-unused.sgml b/docs/reference/gtk/tmpl/gtk-unused.sgml index f1f87c9b25..a9a8d1a421 100644 --- a/docs/reference/gtk/tmpl/gtk-unused.sgml +++ b/docs/reference/gtk/tmpl/gtk-unused.sgml @@ -1471,6 +1471,13 @@ If the window shrinks automatically when widgets within it shrink. @accel_mods: @Returns: + + + + + +@Returns: + @@ -2527,6 +2534,12 @@ Internal function used by #GtkHPaned and #GtkVPaned @child1_req: @child2_req: + + +Old name for gtk_paned_set_handle_size(). + + + Set the the handle size to @size x @size pixels. diff --git a/docs/reference/gtk/tmpl/gtkaccelgroup.sgml b/docs/reference/gtk/tmpl/gtkaccelgroup.sgml index acacceda04..a9126ac0d9 100644 --- a/docs/reference/gtk/tmpl/gtkaccelgroup.sgml +++ b/docs/reference/gtk/tmpl/gtkaccelgroup.sgml @@ -38,14 +38,6 @@ An object representing and maintaining a group of accelerators. - - - - - -@Returns: - - @@ -68,6 +60,7 @@ Deprecated equivalent of g_object_unref(). + diff --git a/docs/reference/gtk/tmpl/gtkpaned.sgml b/docs/reference/gtk/tmpl/gtkpaned.sgml index 33f24283a3..1e3b1df6b8 100644 --- a/docs/reference/gtk/tmpl/gtkpaned.sgml +++ b/docs/reference/gtk/tmpl/gtkpaned.sgml @@ -95,13 +95,6 @@ parameters. This is equivalent to @child: the child to add - - -Old name for gtk_paned_set_handle_size(). - - - - Old name for gtk_paned_set_gutter_size(). diff --git a/docs/reference/gtk/tmpl/gtktypeutils.sgml b/docs/reference/gtk/tmpl/gtktypeutils.sgml index 7008b5006c..305bd7e962 100644 --- a/docs/reference/gtk/tmpl/gtktypeutils.sgml +++ b/docs/reference/gtk/tmpl/gtktypeutils.sgml @@ -146,6 +146,7 @@ Determines whether @type_class is a type of @otype. Gets the class of @tobj. + @tobj: a #GtkObject. diff --git a/gtk/gtkaccelmap.c b/gtk/gtkaccelmap.c index 3f7c8f5e17..6ba3fe32c0 100644 --- a/gtk/gtkaccelmap.c +++ b/gtk/gtkaccelmap.c @@ -212,6 +212,10 @@ g_hash_table_slist_values (GHashTable *hash_table) return slist; } +/* if simulate==TRUE, return whether accel_path can be changed to + * accel_key && accel_mods. otherwise, return whether accel_path + * was actually changed. + */ static gboolean internal_change_entry (const gchar *accel_path, guint accel_key, @@ -220,7 +224,7 @@ internal_change_entry (const gchar *accel_path, gboolean simulate) { GSList *node, *slist, *win_list, *group_list, *replace_list = NULL; - GHashTable *group_hm, *win_hm; + GHashTable *group_hm, *window_hm; gboolean change_accel, removable, can_change = TRUE, seen_accel = FALSE; GQuark entry_quark; AccelEntry *entry = accel_path_lookup (accel_path); @@ -241,7 +245,11 @@ internal_change_entry (const gchar *accel_path, /* if there's nothing to change, not much todo either */ if (entry->accel_key == accel_key && entry->accel_mods == accel_mods) - return FALSE; + { + if (!simulate) + entry->changed = TRUE; + return simulate ? TRUE : FALSE; + } /* nobody's interested, easy going */ if (!entry->groups) @@ -258,7 +266,7 @@ internal_change_entry (const gchar *accel_path, /* 1) fetch all accel groups affected by this entry */ entry_quark = g_quark_try_string (entry->accel_path); group_hm = g_hash_table_new (NULL, NULL); - win_hm = g_hash_table_new (NULL, NULL); + window_hm = g_hash_table_new (NULL, NULL); for (slist = entry->groups; slist; slist = slist->next) g_hash_table_insert (group_hm, slist->data, slist->data); @@ -269,13 +277,13 @@ internal_change_entry (const gchar *accel_path, GtkAccelGroup *group = slist->data; for (node = group->acceleratables; node; node = node->next) - g_hash_table_insert (win_hm, node->data, node->data); + g_hash_table_insert (window_hm, node->data, node->data); } g_slist_free (group_list); /* 3) include all accel groups used by acceleratables */ - win_list = g_hash_table_slist_values (win_hm); - g_hash_table_destroy (win_hm); + win_list = g_hash_table_slist_values (window_hm); + g_hash_table_destroy (window_hm); for (slist = win_list; slist; slist = slist->next) for (node = gtk_accel_groups_from_object (slist->data); node; node = node->next) g_hash_table_insert (group_hm, node->data, node->data); diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index 44b7e821aa..3e88358800 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -1266,7 +1266,7 @@ gtk_drag_find_widget (GtkWidget *widget, new_allocation.x -= tx; new_allocation.y -= ty; } - + while (window && window != widget->parent->window) { gdk_window_get_size (window, &twidth, &theight); @@ -1342,8 +1342,8 @@ gtk_drag_find_widget (GtkWidget *widget, { data->found = data->callback (widget, data->context, - data->x - new_allocation.x, - data->y - new_allocation.y, + data->x - new_allocation.x - x_offset, + data->y - new_allocation.y - y_offset, data->time); /* If so, send a "drag_leave" to the last widget */ if (data->found) -- 2.30.2